﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DDOS.Objects
{
    public class MeleeAttackGambit : Gambit
    {
        public MeleeAttackGambit(GambitCondition gc)
            : base(gc)
        {
        }

        public override void Activate(GameObject self, GameObject other)
        {
            Entity selfEnt = (Entity)self;
            Vector2 vel = (other.Coordinates - self.Coordinates);
            if (vel.Length() > 0)
            {
                vel.Normalize();
                self.Coordinates += vel * (float)((Entity)self).Speed;
            }
        }

        public override string ToString()
        {
            return base.ToString() + "Pursue";
        }
    }
}

